package com.itwn.comic.mapper;

import com.itwn.comic.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    User selectByPrimaryKey(Integer id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);

    @Select("select * from t_user where username = #{username}")
    User selectUserByName(String username);

    List<User> selectUserByCons(String username);


    void updateStatusByCons(@Param("uid") Integer uid, @Param("status") Integer status);
}